package com.n9.qqonline.sales.filter;

import com.n9.qqonline.sales.entity.MsgType;
import com.n9.qqonline.sales.entity.RecvMsg;

import java.util.Objects;

/**
 * 群消息过滤器
 * @author ice
 * @since 2019/3/6 19:13
 */
public class GroupMsgFilter implements RecvMsgFilter{
    @Override
    public boolean accept(RecvMsg msg) {
        if (Objects.nonNull(msg)) {
            return Objects.equals(msg.getMsgType(), MsgType.GROUP);
        }
        return false;
    }
}
